From 03544062e67a19ff192bc5721a25afef67670303 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Fri, 12 Jul 2013 21:57:34 +0000 Subject: [PATCH] geo.cc: let it build w/o expat. cet_util.cc: fixups for the XML_UNICODE case, needed for Windows. --- gpsbabel/cet_util.cc | 6 +++--- gpsbabel/geo.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gpsbabel/cet_util.cc b/gpsbabel/cet_util.cc index 99ebc296c..51ab342bc 100644 --- a/gpsbabel/cet_util.cc +++ b/gpsbabel/cet_util.cc @@ -1278,7 +1278,7 @@ const char* xml_convert_to_char_string_n(const XML_Char* src, int* n) *n = i; /* Appropriately size (not zero terminated) buffer */ - utf8 = utf8b = xmalloc(i); + utf8 = utf8b = (char *)xmalloc(i); for (j = 0; utf8 < utf8b + i; j++) { utf8 += cet_ucs4_to_utf8(utf8, 6, src[j]); @@ -1310,7 +1310,7 @@ const char* xml_convert_to_char_string(const XML_Char* src) } /* We return a NUL terminated string. */ - utf8 = utf8b = xmalloc(i + 1); + utf8 = utf8b = (char *)xmalloc(i + 1); in = src; for (j = 0; utf8 < utf8b + i; j++) { @@ -1351,7 +1351,7 @@ const char** xml_convert_attrs_to_char_string(const XML_Char** xml_attr) } // Allocate space - char_attrs = xmalloc((size + 1) * sizeof(char*)); + char_attrs = (const char **)xmalloc((size + 1) * sizeof(char*)); // Duplicate strings for (i = 0; i < size; ++i) { diff --git a/gpsbabel/geo.cc b/gpsbabel/geo.cc index 9b60496b7..99f701f18 100644 --- a/gpsbabel/geo.cc +++ b/gpsbabel/geo.cc @@ -341,7 +341,6 @@ void wpt_terr(const char* args, const char** unused) } waypt_alloc_gc_data(wpt_tmp)->terr = atof(args) * 10; } -#endif static void geo_rd_init(const char* fname) @@ -355,6 +354,7 @@ geo_read(void) xml_read(); } #endif +#endif static void geo_rd_deinit(void) -- 2.30.2